<?php
function update_sysinfo($termstartday,$switch){
	$query="UPDATE sysinfo set SEMESTERSTART='$termstartday',BBSSWITCH=$switch WHERE Id=1";
	mysql_query($query);
}
function get_sysinfo(){
	$query="SELECT * FROM sysinfo WHERE Id=1";
	$result=mysql_query($query);
	return $result;
}
function is_bbs_on(){
	$query="SELECT BBSSWITCH FROM sysinfo WHERE Id=1";
	$result=mysql_query($query);
	return $result;
}
function get_login_time($userid){
	$query="SELECT LASTLOGIN FROM user WHERE USERID=$userid";
	$result=mysql_query($query);
	return $result;
}
?>